﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache" content="no-cache" />
    <title>添加对比患者</title>
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/ligerui-icons.css" />
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/Gray/css/all.css" />
    <link rel="stylesheet" href="~/Content/css/common.css" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/ligerUI/js/ligerui.all.js"></script>
    <script src="~/Scripts/common.js?v=@DateTime.Now.ToString("yyyyMMdd")"></script>
</head>
<body>
    <div id="maingrid"></div>

    <script>
        $(function(){
            search(1, $("select[name=rp]").val());
        })
        function search(pageNumber,pageSize) {
            var queryData = {}
            initTable(queryData, 1, pageSize);
        }
        function initTable(queryData, pageNumber, pageSize) {
            $("#maingrid").find("tbody").children().remove();
            $("#maingrid").ligerGrid({
                height: '100%',
                data: {
                    "Total": 16, "Rows": [{ "ID": 260, "PATIENT_ID": "N2435678", "IsGreenChannel": null, "PatCardNO": "", "PATIENT_NAME": "张志明", "PATIENT_SEX": "男", "PATIENT_AGE": "21", "IS_BINDING_WRISTBAND": null, "RFID_State": false, "TagID_State": false, "TriageCode_State": false, "PATIENT_STATUS": 0, "EMS_ARRIVEDOOR_TIME": "2019-06-20 17:21:00", "PATIENT_ARRIVE_CLASS": "2", "PRE_DIAGNOSIS": null, "DiagnosticPathId": 2, "DiagnosticPathName": "<span style=\"color:green\">胸痛<span> | <span style=\"color:green\">创伤<span>", "ApprovalStatus": null, "ApprovalRemark": null },
                        { "ID": 247, "PATIENT_ID": "5521144", "IsGreenChannel": 1, "PatCardNO": "3301809351", "PATIENT_NAME": "李勇", "PATIENT_SEX": "女", "PATIENT_AGE": "31", "IS_BINDING_WRISTBAND": null, "RFID_State": false, "TagID_State": true, "TriageCode_State": true, "PATIENT_STATUS": 0, "EMS_ARRIVEDOOR_TIME": "2019-04-01 00:00:00", "PATIENT_ARRIVE_CLASS": "3", "PRE_DIAGNOSIS": null, "DiagnosticPathId": 11, "DiagnosticPathName": "<span style=\"color:green\">胸痛<span> | <span style=\"color:green\">脑卒中<span>", "ApprovalStatus": 3, "ApprovalRemark": "" },
                        { "ID": 248, "PATIENT_ID": "1610201904104614", "IsGreenChannel": null, "PatCardNO": "", "PATIENT_NAME": "陈一鸣", "PATIENT_SEX": "男", "PATIENT_AGE": "33", "IS_BINDING_WRISTBAND": null, "RFID_State": false, "TagID_State": false, "TriageCode_State": false, "PATIENT_STATUS": 0, "EMS_ARRIVEDOOR_TIME": null, "PATIENT_ARRIVE_CLASS": "", "PRE_DIAGNOSIS": null, "DiagnosticPathId": 0, "DiagnosticPathName": "<span style=\"color:green\">胸痛<span>", "ApprovalStatus": null, "ApprovalRemark": null }], "InHospitalNum": 0, "PreHospitalNum": 16, "PathWayNum": 2
                },
                //url: '/PatientList/Search?ram=' + new Date().getMilliseconds(),
                parms: queryData,
                page: pageNumber,
                pageSize: IsEmpty(pageSize) ? 20 : pageSize,
                rownumbers: false,
                heightDiff: -5,
                columns: [
                    { display: '就诊ID', name: 'PATIENT_ID', minWidth: 50, width: 150, },
                    {
                        display: '姓名', name: 'PATIENT_NAME', minWidth: 100, width: 120, render: function (row) {
                            return "<a style=\"cursor:pointer;\" onclick=\"opennewtab('" + row.PATIENT_ID + "','" + row.PATIENT_NAME + "')\" >" + row.PATIENT_NAME + "</a>";
                        }
                    },
                    {
                        display: '性别', name: 'PATIENT_SEX', minWidth: 50, width: 80,
                        render: function (rowData) {
                            if (typeof (rowData.PATIENT_SEX) == "undefined" || rowData.PATIENT_SEX == null || rowData.PATIENT_SEX == "-1")
                                return "未知";
                            if (rowData.PATIENT_SEX == "0")
                                return "男";
                            if (rowData.PATIENT_SEX == "1")
                                return "女";
                            return "<span title=\"" + rowData.PATIENT_SEX + "\">" + rowData.PATIENT_SEX + "</span>";
                        }
                    },
                    { display: '年龄', name: 'PATIENT_AGE', minWidth: 50, width: 80, },
                    {
                        display: '诊疗路径', name: 'DiagnosticPathName', minWidth: 100,
                        render: function (row) {

                            return row.DiagnosticPathName;
                        }
                    }
                ],
                isScroll: true,
                onSuccess: function (data, grid) {
                    
                },
                onSelectRow: function (data, rowindex, rowobj) {
                    parent.window.txtpid = data.ID;
                    frameElement.dialog.close();
                }
            });
        }
    </script>
</body>
</html>
